Florian Müllner [Tue, 11 Feb 2020 18:35:22 +0000 (19:35 +0100)]
unlockDialog: Show unlock hint on inactivity
Inactivity on the unlock screen can be an indication that the user
doesn't know how to get to the auth prompt. Fade in a small hint
that points them in the right direction.
Florian Müllner [Tue, 11 Feb 2020 16:46:11 +0000 (17:46 +0100)]
unlockDialog: Support clock/prompt switching via scrolling
SwipeTracker "only" handles touch gestures and smooth scrolling.
Scrolling still makes sense for regular mice as well though, so
add handling for that as well.
Florian Müllner [Sun, 2 Feb 2020 11:23:32 +0000 (12:23 +0100)]
unlockDialog: Add swipe gesture
Clicking or typing to reveal the auth prompt are good options for
mouse/keyboard workflows, but awkward on touch devices. Now that
we have SwipeTracker, adding corresponding gestures support is
easy, so do just that.
authPrompt: Don't hide the caps lock warning label
Hiding the Caps lock warning label changes the layout of
Auth Prompt. This is specially noticeable when logging in
with unlisted users, where we change the visibility of this
label after typing a username, and the whole user widget
moves a bit.
Change the Cap lock label's opacity instead of hiding it.
Currently, AuthPrompt is connecting to its own 'next' signal
signal to react to any of the entries being activated, and do
some actions like starting the spinner and answering the PAM
question.
Refactor this code into another method, and don't connect to
our own signal.
Unfortunately, the question that is displayed comes directly
from PAM. It usually is just "Password:", which comes from
pam-unix, but other questions can be set, usually with the
colons, since they are crafted with a CLI workflow in mind.
Manually drop the colons from questions asked by PAM. This
is also done by the PolKit agent, which shows how the stack
is fragile, but it's what we have for now.
authPrompt: Connect signals to both text and password entries
This is a regression from the transition to password entry. Both
entries need to be connected to the relevant signals, otherwise
username-based login won't ever work.
Currently, there is a dedicated label above the entry to
display the question text. According to the new mockups
for the lock screen, this label doesn't exist; instead,
the question is set inside the entry itself, as a hint
text.
Set the questions as hint texts of the entry, and remove
the now unused label.
Umang Jain [Fri, 17 Jan 2020 06:47:34 +0000 (12:17 +0530)]
userWidget: Adapt if user is not mentioned for username login
If username-based login flow is followed, we need a default avatar
for the userWidget. Hence, check if the user passed to userWidget
is (null) which implies a username-based login flow.
Umang Jain [Tue, 14 Jan 2020 18:27:02 +0000 (23:57 +0530)]
theme: Add top padding to unlock-dialog-clock-time
The (imaginary) center line for clock time of unlock dialog and the
user avatar should be the same. Since the clock font is 64pt, we need
32pt padding (or 42px).
Umang Jain [Tue, 14 Jan 2020 14:53:36 +0000 (20:23 +0530)]
userWidget: Allow vertical orientation for user avatars
Allow vertical orientation for the userWidget so that the user-avatar
can be centered and user's name can be placed below it. The plan
for 3.36 is to use this vertical userWidget layout for both lock
and login screen.
The userWidget is also used while creating the user-selection list
at the login, hence we still need to keep the horizontal layout
for userWidget in place.
Florian Müllner [Wed, 12 Feb 2020 18:46:44 +0000 (19:46 +0100)]
theme: Make base icon size font-relative
Most icons are used along-side text, like the top bar or menus.
It therefore makes sense for them to adjust along-side the text
when the text-scaling changes.
Jonas Dreßler [Tue, 11 Feb 2020 19:19:50 +0000 (20:19 +0100)]
unlockDialog: Multiply blur sigma value with the scale factor
Since the blur sigma decides how many pixels get factored in when
blurring and setting a scale factor increases the background texture by
that factor, the sigma value should also be multiplied by the scale
factor.
If we modify the paint volume to make it larger and include the blur
radius, we should also use the gained size and draw something there.
Since the framebuffers are only the size of the actor to blur, we're not
doing that right now anyway, so remove the vfunc override.
Jonas Dreßler [Mon, 10 Feb 2020 14:34:57 +0000 (15:34 +0100)]
blur-effect: Use sigma value instead of blur radius
Almost all implementations, including CSS [1] of gaussian blurs use the
sigma/standard deviation value as the input parameter, even if they call
that value "radius". Since using sigma is more correct mathematically
and avoids confusion for people used to other blur implementations, use
that parameter here, too.
Jonas Dreßler [Mon, 10 Feb 2020 14:34:03 +0000 (15:34 +0100)]
blur-effect: Implement incremental calculation of gauss coefficient
Use the shader for linear sampling and incremental calculation of the
gaussian kernel values as it was implemented by Patrick Walton in
webrender.
The sigma value for the blur (the standard deviation) is calculated by
taking the blur radius and dividing it by 3, this value is used by most
implementations of gaussian blurs since it covers a high percentage of
the gaussian shape.
The linear sampling optimization is implemented by skipping every second
texel (i += 2) in the for-loop that's sampling adjacent texels.
Jonas Dreßler [Mon, 10 Feb 2020 14:22:33 +0000 (15:22 +0100)]
blur-effect: Floor downscaled frambuffer sizes
Floor the downscaled size of the new framebuffer to make sure we don't
initialize a framebuffer with a floating point value that might be
interpreted wrong by `cogl_texture_2d_new_with_size` and end up with a
slightly wrong aspect ratio of the framebuffer.
This fixes situations where the widths or heights of downscaled
framebuffers sometimes miss some pixels at the border.
While at it, remove the `downscale_factor` argument from
`setup_projection_matrix` since that function doesn't need the initial
size of the actor anyway.
Florian Müllner [Sat, 30 Nov 2019 18:52:42 +0000 (19:52 +0100)]
extensions-tool: Add option to list updates
Now that we support extension updates, it may be useful to list
pending updates from the command line. It's easy enough to support,
so add a corresponding option to the list command.
AuthPrompt is the set of actors that contain the user avatar,
the username, and the password entry. With the removal of the
screen shield, the unlock dialog (be it UnlockDialog or the
LoginDialog) is always created, and in the case of UnlockDialog,
so is the auth prompt.
This is problematic, though, since for passwordless accounts,
the simple act of creating AuthPrompt authenticates the user,
and lifts the lock screen.
This is the layout manager responsible for ensuring
that the clock is always at the third of the screen
height, and the notifications can push it to above.
This gives the lock shield actor another role: instead of
being the interactive screen shield, make it the invisible
actor that prevents interacting with windows while the
unlock dialog is sliding down.
Activating a dialog is slightly different from opening it; the
former is about showing the user authentication widgetry, while
the latter is about creating it and pre-allocating the necessary
resources.
In addition to that, remove the ClutterBoxLayout that is set as
the layout manager of the Unlock Dialog, and apply the primary
monitor constraint to the child St.BoxLayout instead.